import struct,Pluto
fl=Pluto.walk('tuto_icons')
num=len(fl)
tar=open('tuto_icons.bin','wb')
tar.write('TTIC')
tar.write(struct.pack('i',num))
tar.seek(((num*8+8)/16+1)*16)
point_list=[]
for fn in fl:
    point_list.append(tar.tell())
    fp=open(fn,'rb')
    dat=fp.read()
    size=Pluto.size(fn)
    point_list.append(size)
    fp.close()
    tar.write(dat)
tar.seek(8)
for point in point_list:
    tar.write(struct.pack('i',point))
tar.close()